<?php
/**
 * Отправляет SMS из очереди 
 */

namespace Sbm\Cron;

use Sbm\WebSMS;

require(__DIR__.'/../classes/autoloader.php');

$gateway = new WebSMS\Gateway();

$str = "[Common]
error_num=OK
packet_id =1234
balance_before=4680
sender_ip=123.123.123.XXX
[1]
packet_#=1
message_id =7710258
message_phone =7123456789
message= текст сообщения
message_parts=1
message_zone=1
message_cost=10
[2]
packet_#=2
message_id =7710259
message_phone =7123456780
message_text= текст сообщения
message_parts=1
message_zone=2
message_cost=14
[Summary]
summ_ phone =2
summ_ parts=2
packet_cost=24
balance_after=4656";
$result = $gateway->parseSendResult($str);

var_export($result);

/*
[Common] error_num=OK packet_id =1234 balance_before=4680 sender_ip=123.123.123.XXX [1] packet_#=1 message_id =7710258 message_phone =7123456789 message= текст сообщения
message_parts=1
message_zone=1
message_cost=10
[2] packet_#=2 message_id =7710259 message_phone =7123456780 message_text= текст сообщения
message_parts=1
message_zone=2
message_cost=14 [Summary] summ_ phone =2 summ_ parts=2 packet_cost=24 balance_after=4656
 */